package it.gameplanet.client.widgets;

import com.google.gwt.maps.client.InfoWindowContent;
import com.google.gwt.maps.client.MapWidget;
import com.google.gwt.maps.client.geom.LatLng;
import com.google.gwt.maps.client.overlay.Marker;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;

public class GamePlanetMapWidget extends Composite {

	public GamePlanetMapWidget() {
		super();
		
		MapWidget map;
		
	    LatLng gamePlanetLocation = LatLng.newInstance(43.787369,11.238327);    
	    
	    // Open a map centered on Cawker City, KS USA    
	    map = new MapWidget(gamePlanetLocation, 2);    
	    map.addStyleName("gwt-FullWidthAndHeight");
	    map.setZoomLevel(15);

//	    // Add some controls for the zoom level    
//	    map.addControl(new LargeMapControl());        
//	    // Add a marker    
	    map.addOverlay(new Marker(gamePlanetLocation));    
	    // Add an info window to highlight a point of interest    
	    HTML content = new HTML("<b>Gameplanet</b><br><br>Via Luigi Gordigiani, 36/A<br>50127 Firenze (FI), Italy<br>055 333110");
	    content.addStyleName("gwt-ScritteInfoWindow");
		InfoWindowContent infoWindow = new InfoWindowContent(content);
		infoWindow.setNoCloseOnClick(true);
		map.getInfoWindow().open(map.getCenter(),         
	    		infoWindow);        
	    
	    initWidget(map);
	}

	
}
